import { Body, Controller, Inject, Post,  } from '@midwayjs/decorator';
import { Validate } from '@midwayjs/validate';
import { UserDTO } from '../dto/jiaoyan';
import { TestService } from '../service/test.service';
import {  ApiBearerAuth } from '@midwayjs/swagger';
@Controller('/')
export class TestController {

    @Inject()
    TestService:TestService


 @ApiBearerAuth()
  @Post('/test')
  @Validate()
  async test(@Body() yyid:UserDTO) {
    console.log(yyid);
    return this.TestService.getUser( {  uid:123  })
  }


  @Post('/enitiy')
  async enitiy() {

    return this.TestService.getdata()
  }

  @Post('/enitiy2')
  async enitiy2() {

    return this.TestService.cheerio2()
  }



}
